package org.softmed.rest.generation.scafold;

import java.util.ArrayList;
import java.util.List;

import org.softmed.persistence.PersistenceProvider;
import org.softmed.rest.config.Application;
import org.softmed.rest.generation.GenerationData;
import org.softmed.rest.generation.fields.GenerationConfig;
import org.softmed.rest.generation.uri.URIBuilder;

public class AppConfig {
	Long id;

	String name;
	String path;
	List<ModConfig> modules = new ArrayList<ModConfig>();

	GenerationConfig generationConfig = new GenerationConfig();
	URIBuilder uriBuilder = new URIBuilder();

	List<Class> classes = new ArrayList<Class>();

	String persistenceProvider;
	boolean persistenceDefinitionFileExists = false;
	String handlerSuite;
	String xmlSuite;
	String moduleBuilder;

	boolean generateService = true;
	String restContext = "default";
	boolean storeREST = false;
	boolean refactor = true;

	private GenerationData generationData;

	// private List<ClassDefinition> classDefinitions;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public List<ModConfig> getModules() {
		return modules;
	}

	public void setModules(List<ModConfig> modules) {
		this.modules = modules;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public GenerationConfig getGenerationConfig() {
		return generationConfig;
	}

	public void setGenerationConfig(GenerationConfig generationConfig) {
		this.generationConfig = generationConfig;
	}

	public URIBuilder getUriBuilder() {
		return uriBuilder;
	}

	public void setUriBuilder(URIBuilder uriBuilder) {
		this.uriBuilder = uriBuilder;
	}

	public List<Class> getClasses() {
		return classes;
	}

	public void setClasses(List<Class> classes) {
		this.classes = classes;
	}

	public String getPersistenceProvider() {
		return persistenceProvider;
	}

	public void setPersistenceProvider(String persistenceProvider) {
		this.persistenceProvider = persistenceProvider;
	}

	public String getHandlerSuite() {
		return handlerSuite;
	}

	public void setHandlerSuite(String handlerSuite) {
		this.handlerSuite = handlerSuite;
	}

	public String getXmlSuite() {
		return xmlSuite;
	}

	public void setXmlSuite(String xmlSuite) {
		this.xmlSuite = xmlSuite;
	}

	public String getModuleBuilder() {
		return moduleBuilder;
	}

	public void setModuleBuilder(String moduleBuilder) {
		this.moduleBuilder = moduleBuilder;
	}

	public boolean isGenerateService() {
		return generateService;
	}

	public void setGenerateService(boolean autoGen) {
		this.generateService = autoGen;
	}

	public String getRestContext() {
		return restContext;
	}

	public void setRestContext(String restContext) {
		this.restContext = restContext;
	}

	public boolean isStoreREST() {
		return storeREST;
	}

	public void setStoreREST(boolean store) {
		this.storeREST = store;
	}

	public boolean isRefactor() {
		return refactor;
	}

	public void setRefactor(boolean refactor) {
		this.refactor = refactor;
	}

	public GenerationData getGenerationData() {
		return generationData;
	}

	public void setGenerationData(GenerationData generationData) {
		this.generationData = generationData;
	}

	public boolean isPersistenceDefinitionFileExists() {
		return persistenceDefinitionFileExists;
	}

	public void setPersistenceDefinitionFileExists(
			boolean persistenceDefinitionFileExists) {
		this.persistenceDefinitionFileExists = persistenceDefinitionFileExists;
	}

	// public void setClassDefinitions(List<ClassDefinition> defs) {
	// this.classDefinitions = defs;
	//
	// }
	//
	// public List<ClassDefinition> getClassDefinitions() {
	// return classDefinitions;
	// }

}
